#version 430 
layout(location= 0) uniform mat4 MMatrix;
layout(location= 1) uniform mat4 VPMatrix;

layout(location= 0) in vec4 pos;
layout(location= 1) in vec3 normal;
layout(location= 2) in vec2 texCood;

out vec3 vpos;
out vec3 vnormal;
out vec2 vtexCood;

void main()
{
	vnormal = normalize(mat3(MMatrix) * normal);
	vec4 worldPos = MMatrix * pos;
	vpos = worldPos.xyz;
	vtexCood = texCood;
	gl_Position = VPMatrix*worldPos;
}
